package phapp.model.qfd;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: t_custdiscuss_data 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Custdiscuss extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;
   public static final String FORMAT_UPDATE_DATE = DATE_TIME_FORMAT;

   // columns START
   /** discussId */
   private java.lang.Integer discussId;
   /** custqfdId */
   private java.lang.Integer custqfdId;
   /** discussCustid */
   private java.lang.Integer discussCustid;
   /** discussText */
   private java.lang.String discussText;
   /** discussStatus */
   private java.lang.Integer discussStatus;
   /** createDate */
   private java.sql.Timestamp createDate;
   /** updateDate */
   private java.sql.Timestamp updateDate;

   private java.util.ArrayList idList;
   
   private String discussCustName;

   // columns END

   public Custdiscuss()
   {
   }

   public String getDiscussCustName()
   {
      return discussCustName;
   }

   public void setDiscussCustName(String discussCustName)
   {
      this.discussCustName = discussCustName;
   }

   public Custdiscuss(java.lang.Integer discussId)
   {
      this.discussId = discussId;
   }

   public void setId(java.lang.Integer value)
   {
      this.discussId = value;
   }

   public java.lang.Integer getId()
   {
      return this.discussId;
   }
   
   public void setDiscussId(java.lang.Integer value)
   {
      this.discussId = value;
   }

   public java.lang.Integer getDiscussId()
   {
      return this.discussId;
   }

   public void setCustqfdId(java.lang.Integer value)
   {
      this.custqfdId = value;
   }

   public java.lang.Integer getCustqfdId()
   {
      return this.custqfdId;
   }

   public void setDiscussCustid(java.lang.Integer value)
   {
      this.discussCustid = value;
   }

   public java.lang.Integer getDiscussCustid()
   {
      return this.discussCustid;
   }

   public void setDiscussText(java.lang.String value)
   {
      this.discussText = value;
   }

   public java.lang.String getDiscussText()
   {
      return this.discussText;
   }

   public void setDiscussStatus(java.lang.Integer value)
   {
      this.discussStatus = value;
   }

   public java.lang.Integer getDiscussStatus()
   {
      return this.discussStatus;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public String getUpdateDateString()
   {
      return date2String(getUpdateDate(), FORMAT_UPDATE_DATE);
   }

   public void setUpdateDateString(String value)
   {
      setUpdateDate(string2Date(value, FORMAT_UPDATE_DATE, java.sql.Timestamp.class));
   }

   public void setUpdateDate(java.sql.Timestamp value)
   {
      this.updateDate = value;
   }

   public java.sql.Timestamp getUpdateDate()
   {
      return this.updateDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("DiscussId", getDiscussId()).append("CustqfdId", getCustqfdId()).append("DiscussCustid", getDiscussCustid()).append("DiscussText", getDiscussText()).append("DiscussStatus", getDiscussStatus())
               .append("CreateDate", getCreateDate()).append("UpdateDate", getUpdateDate()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getDiscussId()).append(getCustqfdId()).append(getDiscussCustid()).append(getDiscussText()).append(getDiscussStatus()).append(getCreateDate()).append(getUpdateDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if (obj instanceof Custdiscuss == false) return false;
      if (this == obj) return true;
      Custdiscuss other = (Custdiscuss) obj;
      return new EqualsBuilder().append(getDiscussId(), other.getDiscussId()).append(getCustqfdId(), other.getCustqfdId()).append(getDiscussCustid(), other.getDiscussCustid()).append(getDiscussText(), other.getDiscussText())
               .append(getDiscussStatus(), other.getDiscussStatus()).append(getCreateDate(), other.getCreateDate()).append(getUpdateDate(), other.getUpdateDate()).isEquals();
   }
}
